-
Notifications
You must be signed in to change notification settings - Fork 875
docs(hier-dep-inj): fix comp name, spelling in field name, copyedits #3335
docs(hier-dep-inj): fix comp name, spelling in field name, copyedits #3335
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes.
One question and one tiny update for you and then I'll LGTM.
:marked | ||
By providing `VillainsService` in the `VillainsListComponent` metadata — and nowhere else —, | ||
By providing `VillainsService` in the `VillainsListComponent` metadata — and nowhere else — |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comma was correct but ugly. Please rephrase:
By providing
VillainsService
in theVillainsListComponent
metadata and nowhere else,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
get taxReturn(): HeroTaxReturn { | ||
return this.heroTaxReturnService.taxReturn; | ||
} | ||
@Input() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you move this here? I realize it is technically true that the @Input
applies to the setter but does it looks awful and it doesn't change Angular's behavior, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a matter of style, we should encourage readers to associate @Input
with setters. This way, documentation and refactoring tools, for example, will attribute the decorator to the proper class member.
Right, Angular's behavior isn't affected (though IMHO it might be incidental behavior that it happens to work when attached to the getter).
If you feel strongly about it, I can undo it. Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly about it ... yet.
If we really believe that @Input
should adorn the setter, we should find a place in the docs to say that and say why. If you have a moment to look for that place and propose language for it, I'd be grateful.
That would be a separate PR. I'm merging this one.
- `villaines` --> `villains` - `TaxReturnComponent` --> `HeroTaxReturnComponent` - Moved `@Input()` to be on setter rather than getter. - Other misc copyedits
ee4e065
to
a5f846e
Compare
@Input()
to be on setter rather than getter.villaines
-->villains
TaxReturnComponent
-->HeroTaxReturnComponent